package com.zcx.qshop.menu;

import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;

import com.zcx.helper.view.swipe.SwipeMenu;
import com.zcx.helper.view.swipe.SwipeMenuCreator;
import com.zcx.helper.view.swipe.SwipeMenuItem;
import com.zcx.qshop.QSApplication;

/**
 * Created by Administrator on 2015/8/22 0022.
 */
public class DeleteMenuCreator implements SwipeMenuCreator {

    private Context context;

    public DeleteMenuCreator(Context context){

        this.context = context;

    }

    @Override
    public void create(SwipeMenu swipeMenu) {

        SwipeMenuItem openItem = new SwipeMenuItem(context);

        openItem.setBackground(new ColorDrawable(Color.parseColor("#fe3c2e")));

        openItem.setWidth(QSApplication.ScaleScreenHelper.getWidthHeight(150));

        openItem.setTitle("删除");

        openItem.setTitleSize(15);

        openItem.setTitleColor(Color.WHITE);

        swipeMenu.addMenuItem(openItem);

    }

}
